package com.ltf.order.interceptor;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * @Auther: liutf
 * @Date: 2025/3/27
 * @Description: com.ltf.order.interceptor
 * @version: 1.0
 */

@Component
public class TokenRequestInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate requestTemplate) {
        System.err.println("拦截器启动。。。。。。");
        requestTemplate.header("X-Token", UUID.randomUUID().toString());
    }
}
